<template lang="html">
  <div class="">
    <toubu v-on:changePage="chagepage"></toubu>
    <keep-alive>
    <component :is="currentpage"></component>
    </keep-alive>
  </div>
</template>

<script>
import toubu from '@/components/toubu.vue';
import homeOne from '@/components/homeOne';
import homeTwo from '@/components/homeTwo';
export default {
  data(){
    return{
      currentpage:homeOne
    }
  },
  methods:{
    chagepage(index){
      if(index == 1){
        this.currentpage = homeOne;
      }else{
        this.currentpage = homeTwo;
      }
    }
  },
  components:{toubu,homeOne,homeTwo}
}
</script>

<style lang="css" scoped>
</style>
